package com.xudayong.Demo;
//猴子吃桃
public class Demo02 {
    public static void main(String[] args) {
        T t = new T();

        System.out.println( t.monkey(9));
    }


static class T{
        public int monkey(int i){
            if (i==10){
                return 1;
            }else if (i>=1&&i<=9){
                return monkey(i+1)*2;
            }
            return -1;
        }
}
}
